
//公共目录 项目价格 接口相关的函数
import request from "../../untils/request.js"

/**
 *
 *  post
 *
 */

//新建挂号类别
export const insertRegisterCategory = (data) => {
    return request.post("/outpatient/insertRegisterCategory", data )
}

// 用于新建收費項目
export const addChargeProject = (data) => {
    return request.post("/outpatient/addChargeProject", data )
}

//修改挂号类别
export const updateRegisterCategory = (data) => {
    return request.post("/outpatient/updateRegisterCategory", data )
}

// 更新收費項目
export const updateChargeProject = (data) => {
    return request.post("/outpatient/updateChargeProject", data )
}

// 查询标准项目下拉框
export const selectStandardItem = (data) => {
    return request.get("/outpatient/selectStandardItem", data )
}

// 查询计量单位下拉框
export const selectMeasureUnit = (data) => {
    return request.get("/outpatient/selectMeasureUnit", data )
}

// 查询费用类别下拉框
export const selectCostType= (data) => {
    return request.get("/outpatient/selectCostType", data )
}


// 查询下拉框
export const selectZxks= (data) => {
    return request.get("/outpatient/selectZxks", data )
}

/**
 *
 * get
 *
 */

// 列表

export const costnametablePage = (params) => {
    return request.get("/outpatient/costnametable/page", { params })
}
// 树菜单 新建收費項目，费用类别
export const getCostType = (params) => {
    return request.get("/outpatient/getCostType", { params })
}

// 获取挂号类别列表，带分页查询
// export const getRegisterType = (params) => {
//     return request.get("/outpatient/getRegisterType", { params })
// }

// 删除挂号类别
export const deleteRegisterCategory = (data) => {
    return request.delete("/outpatient/deleteRegisterCategory", { data })
}

//删除单个数据
export const delOneItemPrice = (data) => {
    return request.delete("/outpatient/delOneItemPrice", { data })
}

//根据状态查询数据
export const byStatusGetData = (data) => {
    return request.get("/outpatient/byStatusGetData", { data })
}

//关键字查询
export const queryKeyword = (data) => {
    return request.get("/outpatient/queryKeyword", { data })
}


//修改
export const updateChargePrice = (data) => {
    return request.put("/outpatient/costnametable", data)
}

//新增
export const addChargePrice = (data) => {
    return request.post("/outpatient/costnametable", data)
}

// 标准项目列表
export const standardList = (params) => {
    return request.get("/outpatient/costnametable/standardList", { params })
}

// 新建收費項目，财务分类接口
export const getSosTypes = (params) => {
    return request.get("/outpatient/getSosTypes", { params })
}

//查询所有科室
export const getAttribute = () => {
    return request.get("/outpatient/findAttribute")
}

//查询单个项目价格
export const getChargingPriceById = (id) => {
    return request.get(`/outpatient/costnametable/${id}`)
}



/*
 *
 * DELETE
 *
 */


// 暴露
export default{
    costnametablePage,getCostType,delOneItemPrice,addChargePrice,getSosTypes,standardList
}